﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TGIApp.Providers
{
    public class RoleProvider: System.Web.Security.RoleProvider
    {
        public override void AddUsersToRoles(string[] usernames, string[] roleNames)
        {
            //throw new NotImplementedException();
            return;
        }

        public override string ApplicationName
        {
            get;
            set;
        }

        public override void CreateRole(string roleName)
        {
            return;
        }

        public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
        {
            return true;
        }

        public override string[] FindUsersInRole(string roleName, string usernameToMatch)
        {
            return null;
        }

        public override string[] GetAllRoles()
        {
            return null;
        }

        public override string[] GetRolesForUser(string username)
        {
            var business = new Business.ProviderHelper();
            return business.GetRolesForUser(username).ToArray();
        }

        public override string[] GetUsersInRole(string roleName)
        {
            return null;
        }

        public override bool IsUserInRole(string username, string roleName)
        {
            var business = new Business.ProviderHelper();
            return business.IsUserInRole(username,roleName);
        }

        public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
        {
            return ;
        }

        public override bool RoleExists(string roleName)
        {
            return true;
        }
    
    }
}
